[IA64] Kexec: Fix ia64_do_tlb_purge so that it works with XEN
authorAlex Williamson <alex.williamson@hp.com>
Thu, 27 Sep 2007 22:24:02 +0000 (16:24 -0600)
committerAlex Williamson <alex.williamson@hp.com>
Thu, 27 Sep 2007 22:24:02 +0000 (16:24 -0600)
commitfa297137042a2079bff62323522db0b826300c3c
treeba4e20b00f551260bdd2bc2461316ed0d67a1907
parentd72c11579402a6ef4ec752a4ba9c353bd2394c0d
[IA64] Kexec: Fix ia64_do_tlb_purge so that it works with XEN

Fix ia64_do_tlb_purge, its broken in too many ways

1. Call SET_PER_CPU_DATA before making any calls to GET_THIS_PADDR
   to ensure that per-cpu data is set up correctly.

2. Use the per_cpu variable to derive CURRENT_STACK_OFFSET rather
   than reading it from a kernel register. See 1) for explanation
   of why.

3. In the VHPT pruning code, don't use r25 as ia64_jump_to_sal,
   which branches to ia64_do_tlb_purge expects r25 to be preserved.
   There seems no reason not to use r2 as per the other purges
   done in ia64_do_tlb_purge.  Furthermore use r16 and r18 instead
   of r20 and r24 for consistency reasons.

4. Move __va_ul(vcpu_vhpt_maddr(v)) comment outside of
   #if VHPT_ENABLED as it also applies to code further down that
   is outside the #if

Cc: Tristan Gingold <tgingold@free.fr>,
Cc: Yutaka Ezaki <yutaka.ezaki@jp.fujitsu.com>,
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>,
Cc: Kazuhiro Suzuki <kaz@jp.fujitsu.com>,
Signed-off-by: Simon Horman <horms@verge.net.au>
xen/arch/ia64/linux-xen/mca_asm.S